/*
 * Created on Sep 22, 2003
 * Event
 * Local Projects Database
 * (c) 2003 eRomania Gateway Association
 *
 */
package ro.gateway.aida.usr.messaging;

import java.sql.Date;



/**
 * @author Mihai Postelnicu
 * Base class for the messaging package. The event contains root information about user-received
 * messages : notifications,alerts,approvals,syslog
 *  *
 */
public class Event
{
      /**
       * this is the id for the source object
       */
      protected long sourceObjId;
      /**
       * this is the user that triggered the message (sender)
       */
      protected long sourceUserId;
      /**
       * optinally, the user name of the source
       */
      protected String sourceUserName;
      /**
       * triggered object type.
       */
      protected int sourceType;
      /**
       * notification,alert,approval
       */
      protected int eventType;
      /**
       * the date the message was issued
       */
      protected Date sent;

      protected long eventId;

      /**
       * @return
       */
      public long getSourceObjId()
      {
            return sourceObjId;
      }

      /**
       * @return
       */
      public Date getSent()
      {
            return sent;
      }

      /**
       * @return
       */
      public int getSourceType()
      {
            return sourceType;
      }

      /**
       * @return
       */
      public int getEventType()
      {
            return eventType;
      }

      /**
       * @param i
       */
      public void setSourceObjId( long i )
      {
            sourceObjId = i;
      }

      /**
       * @param date
       */
      public void setSent( Date date )
      {
            sent = date;
      }

      /**
       * @param i
       */
      public void setSourceType( int i )
      {
            sourceType = i;
      }

      /**
       * @param i
       */
      public void setEventType( int i )
      {
            eventType = i;
      }

      /**
       * @return
       */
      public long getSourceUserId()
      {
            return sourceUserId;
      }

      /**
       * @param i
       */
      public void setSourceUserId( long i )
      {
            sourceUserId = i;
      }

      /**
       * @return
       */
      public long getEventId()
      {
            return eventId;
      }

      /**
       * @param i
       */
      public void setEventId( long i )
      {
            eventId = i;
      }

      /**
       * @return
       */
      public String getSourceUserName()
      {
            return sourceUserName;
      }

      /**
       * @param string
       */
      public void setSourceUserName( String string )
      {
            sourceUserName = string;
      }

      public static final int SYSLOG = 1;
      public static final int ALERT = 2;
}
